const { EEXIST } = require('constants')
const express = require('express')
const { send } = require('process')

const app = express()

/* app.get('/home',(req,res)=>{
    console.log(req.query);
    res.send(req.query)
})

app.get('/user/:ids/:names',(req,res)=> {
    console.log(req.params);
    res.send(req.params)
})

app.post('/add',(req,res)=> {
    res.send({
        name:'post'
    })
}) */

/* app.get('/home',(req,res)=> {
    console.log(req.query)
    res.send(req.query)
})

app.get('/user/:id/:name',(req,res)=>{
    console.log(req.params)
    res.send(req.params)
})

app.post('/add',(req,res)=> {
    res.send({
        name:'post'
    })
}) */

app.get('/home',(req,res)=>{
    res.send(req.query)
})

app.post('/user/:id/:name',(req,res)=>{
    res.send(req.params)
})  

app.post('/',(req,res)=>{
    res.send('post good')
})


app.listen(8080,()=>{
    console.log('8080 running')
})